#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <assert.h>



//char* strncat(char* destination, const char* source, size_t num);




char* my_strncat(char* des, const char* src,int num)
{
	assert(des);
	assert(src);


	char* temp = des;


	while (*des)
	{
		des++;
	}


	while (*src && num--)
	{
		*des++ = *src++;

	}

	*des = '\0';

	return temp;


}




int main()
{


	char str1[20];
	char str2[20];
	strcpy(str1, "To be ");
	strcpy(str2, "or not to be");
	my_strncat(str1,str2,6);
	puts(str1);




	return 0;
}